<template>
	<view class="">
		<u-navbar :is-back="true" title="上课记录" back-icon-color="#ffffff" :background="{backgroundColor:'#E62131'}"
			title-color="#ffffff"></u-navbar>
			<view class="topcenlsit">
				<view class="listcenter" v-for="(item,index) in list" :key="index">
					<!-- <image class="unadsde" src="../../static/images/me1.png" mode=""></image> -->
					<view class="rightlist">
						<view class="toptitle">
							<text>{{item.coachName}}</text>
							<!-- <text>张三李四</text> -->
						</view>
						<view class="btnlista">
							<text>{{item.classInfo.name}} {{item.classYear}}-{{item.classDate}} {{item.classStartTime}}~{{item.classEndTime}}</text>
							<text style="color: #42b983;">
								<u-icon name="eye-fill" color="#42b983" size="28"></u-icon>上课 
							</text>
							<!-- <text  style="color: #E62131;">
								<u-icon name="eye-off" color="#E62131" size="28"></u-icon>请假
							</text> -->
						</view>
					</view>
				</view>
			</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				parms: {
					page: 1,
					limit: 18,
					isAttendance:1,
				},

			}
		},
		onReachBottom() {
			this.parms.page += 1
			this.endkecheng()
		},
		onLoad(option) {

			this.endkecheng()

		},
		methods: {
			endkecheng() {
				uni.$api.common.studentworkList(this.parms).then((res) => {
					if (res.count === this.list.length && this.list.length > 0) {
						uni.showToast({
							title: '没有更多了',
							icon: 'none',
							duration: 2000
						});
					} else {
						res.result.forEach((item) => {
							this.list.push(item)
						})
					}
				});
			},
			
		}
	};
</script>
<style lang="scss">
	.topcenlsit{
		padding: 30rpx;
		.listcenter{
			margin-bottom: 30rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.unadsde{
				width: 80rpx;
				height: 80rpx;
				margin-right: 30rpx;
				border-radius: 50%;
			}
			.rightlist{
				width: 100%;
				.toptitle{
					font-weight: bold;
				}
				.btnlista{
					display: flex;
					align-items: center;
					justify-content: space-between;
				}
			}
		}
	}
</style>